﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminM.Master" AutoEventWireup="true" CodeBehind="Mxunluo.aspx.cs" Inherits="XqWebSite.WebForm100" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">



        .style6
    {
        width: 174px;
            background-color: #8F9B82;
        }
        .style9
        {
            height: 9px;
        background-color: #8F9B82;
            text-decoration: underline;
        }
    .style8
    {
        text-align: center;
        font-family: 华文隶书;
        font-size: larger;
            color: #A3BAA5;
            background-color: #DDDFDB;
        }
        .style10
    {
        width: 100%;
    }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style1" style="height: 564px; width: 100%;">
        <tr>
            <td class="style6" rowspan="2">
                <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" 
                        StaticDisplayLevels="2" style="font-family: 楷体">
                </asp:Menu>
            </td>
            <td class="style9">
                <asp:SiteMapPath ID="SiteMapPath1" runat="server" style="font-family: 楷体" 
                    SiteMapProvider="AdminSiteMap">
                </asp:SiteMapPath>
            </td>
        </tr>
        <tr>
            <td class="style8">
                <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" 
                        SiteMapProvider="AdminSiteMap" />
                <table class="style10">
                    <tr>
                        <td style="color: #000000">
                            巡逻信息管理</td>
                    </tr>
                    <tr>
                        <td style="text-align: left; color: #000000">
                            排班人ID:<asp:TextBox ID="Tex_Pbr" runat="server"></asp:TextBox>
                            &nbsp;
                            <asp:Button ID="But_ss" runat="server" Text="搜索" onclick="But_ss_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请输入巡逻单ID:<asp:TextBox ID="Tex_sc" runat="server"></asp:TextBox>
                            <asp:Button ID="But_sc" runat="server" Text="删除" onclick="But_sc_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="But_xg" runat="server" Text="修改" onclick="But_xg_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                AutoGenerateColumns="False" DataKeyNames="ID" Height="344px" Width="994px" 
                                onselectedindexchanged="GridView1_SelectedIndexChanged">
                                <Columns>
                                    <asp:BoundField DataField="ID" HeaderText="维修ID" InsertVisible="False" 
                                        ReadOnly="True" SortExpression="ID" />
                                    <asp:BoundField DataField="AdminID" HeaderText="排班人ID" 
                                        SortExpression="AdminID" />
                                    <asp:BoundField DataField="BaoanID" HeaderText="被排班安保人员ID" 
                                        SortExpression="BaoanID" />
                                    <asp:BoundField DataField="FanbuShijian" HeaderText="发布时间" 
                                        SortExpression="FanbuShijian" />
                                    <asp:BoundField DataField="XunLuoQuYu" HeaderText="巡逻区域" 
                                        SortExpression="XunLuoQuYu" />
                                </Columns>
                            </asp:GridView>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:WuYeGuanLiConnectionString %>" 
                                DeleteCommand="DELETE FROM [Xunluo] WHERE [ID] = @ID" 
                                InsertCommand="INSERT INTO [Xunluo] ([FanbuShijian], [XunLuoQuYu], [AdminID], [BaoanID]) VALUES (@FanbuShijian, @XunLuoQuYu, @AdminID, @BaoanID)" 
                                SelectCommand="SELECT [ID], [FanbuShijian], [XunLuoQuYu], [AdminID], [BaoanID] FROM [Xunluo]" 
                                UpdateCommand="UPDATE [Xunluo] SET [FanbuShijian] = @FanbuShijian, [XunLuoQuYu] = @XunLuoQuYu, [AdminID] = @AdminID, [BaoanID] = @BaoanID WHERE [ID] = @ID">
                                <DeleteParameters>
                                    <asp:Parameter Name="ID" Type="Int64" />
                                </DeleteParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="FanbuShijian" Type="String" />
                                    <asp:Parameter Name="XunLuoQuYu" Type="String" />
                                    <asp:Parameter Name="AdminID" Type="Int64" />
                                    <asp:Parameter Name="BaoanID" Type="Int64" />
                                </InsertParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="FanbuShijian" Type="String" />
                                    <asp:Parameter Name="XunLuoQuYu" Type="String" />
                                    <asp:Parameter Name="AdminID" Type="Int64" />
                                    <asp:Parameter Name="BaoanID" Type="Int64" />
                                    <asp:Parameter Name="ID" Type="Int64" />
                                </UpdateParameters>
                            </asp:SqlDataSource>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>

